 package org.example.service.export;

import java.util.Date;

import org.example.dto.DemoDTO;
import org.example.service.ServiceDemo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;

import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
public class ServiceDemoImpl implements ServiceDemo{

    @Override
    public void service1() {
         log.info("ServiceDemoImpl#service1");
    }

    @Override
    public void service2(String msg) {
        log.info("ServiceDemoImpl#service2=>{}",msg);
    }

    @Override
    public DemoDTO service3() {
        DemoDTO demo = new DemoDTO();
        demo.setDate(new Date());
        demo.setName("aa");
        demo.setStatus(false);
        
        log.info("json =>{} ",JSONObject.toJSON(demo));
        
         return demo;
    }

}
